package cn.javav.sso.entity;

public class User {
	
	private int userId;
	private String userName;
	private String userAccount;
	private String password;
	private String job;
	private int deptId;
	
	@Override
	public String toString() {
		return "User [userId=" + userId + ", userName=" + userName
				+ ", userAccount=" + userAccount + ", password=" + password
				+ ", job=" + job + ", deptId=" + deptId + "]";
	}
	public User() {
		
	}
	public User(String userAccount, String password) {
		this.userAccount = userAccount;
		this.password = password;
	}
	public User(String userName, String userAccount,
			String password, String job, int deptId) {
		super();
		this.userName = userName;
		this.userAccount = userAccount;
		this.password = password;
		this.job = job;
		this.deptId = deptId;
	}
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getUserAccount() {
		return userAccount;
	}
	public void setUserAccount(String userAccount) {
		this.userAccount = userAccount;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getJob() {
		return job;
	}
	public void setJob(String job) {
		this.job = job;
	}
	public int getDeptId() {
		return deptId;
	}
	public void setDeptId(int deptId) {
		this.deptId = deptId;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((userAccount == null) ? 0 : userAccount.hashCode());
		result = prime * result + userId;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		User other = (User) obj;
		if (userAccount == null) {
			if (other.userAccount != null)
				return false;
		} else if (!userAccount.equals(other.userAccount))
			return false;
		if (userId != other.userId)
			return false;
		return true;
	}
	
}
